import axios from 'axios'
import { getToken } from '@/utils/auth'

const headers = {
  'Content-Type': 'application/json',
  'authorization_token': getToken()
}

// 取消订单
export const cancelOrder = data => axios({
  url: `/po_otc/c2c/cancelOrder`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 成交订单
export const releaseCoin = data => axios({
  url: `/po_otc/c2c/releaseCoin`,
  method: 'put',
  data: JSON.stringify(data),
  headers
})
